<template>
    <div>
        <el-form label-width="85px">
            <div class='item'>
                <p class='title'>
                    基础信息
                </p>
                <el-form-item label="设备编号：">
                    {{btmData.code}}
                </el-form-item>
                <el-form-item label="设备名称：">
                    {{btmData.name}}
                </el-form-item>
                <el-form-item label='运行状态：'>
                    {{btmData.status==0?'正常':btmData.status==1?'停止运行':btmData.status==2?'故障':"维修中"}}
                </el-form-item>
                 <el-form-item label="货币标识：">
                    {{btmData.currencyCode}}
                </el-form-item>
                 <el-form-item label='备注：'>
                    {{btmData.remark}}
                </el-form-item>
                <!-- <el-form-item label='数量：'>
                    {{btmData.boxes[2]&&btmData.boxes[2].num}}
                </el-form-item>
                <el-form-item label="存款箱：">
                    {{btmData.depositBox}}
                </el-form-item> -->
                 <el-form-item label='投放时间：'>
                    {{btmData.createTime}}
                </el-form-item>
            </div>

            <div class='item'>
                <p class="title">地址信息</p>
                <el-form-item label="设备地址：">
                {{btmData.address.cityName}}
                </el-form-item>
                <el-form-item label='详细地址：'>
                    {{btmData.address.detail}}
                    <!-- <br>
                    国家标识：{{btmData.address.country}} -->
                    <hr>
                    谷歌维度：{{btmData.address.googleLat}}
                    <br>
                    谷歌经度：{{btmData.address.googleLon}}
                    <hr>
                    经度：{{btmData.address.mapLon}}
                    <br>
                    维度：{{btmData.address.mapLat}}
                </el-form-item>
            </div>

            <div class='item'>
                <p class='title'>箱子信息</p>
                <el-form-item label='设备盒子：'>
                    <p class='btm-item' v-for='(item,index) of btmData.boxes' :key='index'>
                        类型：{{item.type==0?'小额取款箱':item.type==1?'大额取款箱':'存款箱'}}
                        <br>
                        BTM标识：{{item.id}}
                        <!-- <br>
                        创建时间：{{item.createTime}} -->
                        <br>
                        面额：{{item.denomination}}
                        <br>
                        数量：{{item.num}}
                        <!-- <br>
                        修改时间：{{item.updateTime}} -->
                        <br>
                        金额：{{item.amount }}
                    </p>
                </el-form-item>
            </div> 
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button type="default" @click="cancel" size='small' style="margin-left: 45%;margin-top: 30px">返回</el-button>
        </div>
    </div>
</template>
<script>
    export default{
        data(){
            return{

            }
        },
        props: {
            btmData:{
                type:Object,
                default:{},
            }
        },
        methods:{
            cancel(){
                this.$emit('cancel')
            },
        },
        mounted () {
            //console.log(this.btmData)
        }
    }
</script>
<style>
    .btm-item{
        border-bottom: 1px solid #ddd;
    }
    .title{
        background: #13ce66;
        color: #fff;
        padding: 8px 10px;
        font-weight: 700;
    }
    .item{
        border:1px solid #ddd;
        border-top:0;
        margin-bottom: 10px;
    }
</style>
